package com.cx.android;

import java.util.ArrayList;
import android.os.Bundle;
import android.app.Activity;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;

public class DisplayInfoActivity extends Activity 
{
	TextView             _titleTextView;
	ListView             _menuListView;
	ArrayAdapter<String> _menuArrayAdapter;
	ArrayList<String>    _menuItems;

	OnItemClickListener  _menuListViewOnItemClickListener = new OnItemClickListener()
	{
		public void onItemClick(AdapterView<?> parentView, View eventedView, int position, long id)
		{
		}
	};
	
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.lo_displayinfo);


		_menuListView =(ListView)findViewById(R.id.element);
		
		_menuItems = new ArrayList<String>();

		String item;
		final DisplayMetrics dm =  getBaseContext().getResources().getDisplayMetrics();
		item = "density :"    ; item += dm.density   ; _menuItems.add(item);   
		item = "densityDpi :" ; item += dm.densityDpi; _menuItems.add(item);
		item = "xdpi :"       ; item += dm.xdpi      ; _menuItems.add(item);
		item = "ydpi :"       ; item += dm.ydpi      ; _menuItems.add(item);
		
		_menuArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, _menuItems);
		_menuListView.setAdapter ( _menuArrayAdapter );
        _menuListView.setOnItemClickListener( _menuListViewOnItemClickListener );				
    }
}